package com.xingdata.jjxc.pushnavi;

import java.nio.ByteBuffer;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import com.amap.api.navi.model.NaviLatLng;
import com.google.gson.Gson;

/**
 * Created by Administrator on 2016/9/12.
 */
public class NaviParams {
    public double latitude;
    public double longitude;
    public int    naviPlanRouterTypeFlag;
    public String naviType;
    public boolean useGps;
    public NaviLatLng start;
    public NaviLatLng end;
    public List<NaviLatLng> waypoints = new ArrayList<NaviLatLng>();
    public int naviPathSeletedIndex = 0;
    public int selectedIndex;
    public int currentStragtegyForNavi;// 导航策略

    public NaviParams(){
    }

    public String toJsonString(){
        Gson gson = new Gson();
        return gson.toJson(this);   
    }

    public static  NaviParams fromJson(String str){
        Gson gson = new Gson();
        return  (NaviParams) gson.fromJson(str,NaviParams.class);
    }

    public ByteBuffer toBytes(){
        ByteBuffer byteBuffer = ByteBuffer.wrap(toJsonString().getBytes());
        return byteBuffer;
    }
}
